import request from '@/utils/request'
/**
 * 员工管理 获取快递员分页数据
 */

export const getCourierAPI = (params) => {
  return request({
    url: '/manager/business-hall/courier/page',
    params
  })
}

/**
 * 司机管理 获取司机分页数据
 *
 */
export const getDriverListAPI = (params) => {
  return request({
    url: '/manager/driver/page',
    params
  })
}
/**
 * 查看司机详细
 */
export const getDriverDetailAPI = (id) => {
  return request({
    url: `/manager/driver/${id}`

  })
}
/**
 * 获取驾驶证详细信息
 */
export const getDrivingLicenceAPI = (id) => {
  return request({
    url: `/manager/driverLicense/${id}`
  })
}
/**
 * 保存司机信息
 */
export const updateDriverMessageAPI = (data) => {
  return request({
    method: 'put',
    url: `/manager/driver/${data.id}`,
    data
  })
}
/**
 * 获取已经停用的车辆
 */
export const getUnWorkingTrucksAPI = () => {
  return request({
    url: '/manager/unWorkingTrucks'

  })
}
/**
 * 获取车辆详情
 */
export const getTruckDetailsAPI = (id) => {
  return request({
    url: `/manager/truck/${id}`
  })
}
/**
 * 获取树状机构信息
 */
export const getOrganizationAPI = () => {
  return request({
    url: '/manager/business-hall/tree'
  })
}
/**
 * 分页查询排班
 */
export const getSchedulingAPI = (params) => {
  return request({

    url: '/manager/work-schedulings',
    params

  })
}
/**
 * 工作模式下拉列表
 */
export const getWorkPatternListAPI = () => {
  return request({

    url: '/manager/work-patterns/all'

  })
}

/**
 * 排班设置  工作模式分页查询
 */
export function getWorkPatternAPI(params) {
  return request({
    url: '/manager/work-patterns/page',
    params
  })
}
